package com.yss.reportworld.api;

import com.yss.common.core.constant.SecurityConstants;
import com.yss.common.core.constant.ServiceNameConstants;
import com.yss.common.core.domain.YssResponse;
import com.yss.reportworld.api.factory.RemoteStatisticsReportFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestHeader;

import java.util.List;
import java.util.Map;


/**
 * 报表世界需要在首页显示的信息
 */
@FeignClient(contextId = "remoteStatisticReportService", value = ServiceNameConstants.REPORTWORLD_SERVICE, fallbackFactory = RemoteStatisticsReportFallbackFactory.class)
public interface RemoteStatisticReportService {

    @PostMapping("/statisticsReportWorld/getNoticeInfo")
    public YssResponse<String> getNoticeInfo(@RequestHeader(SecurityConstants.FROM_SOURCE) String source);

    @PostMapping("/statisticsReportWorld/getVersionList")
    public YssResponse<List<String>> getVersionList(@RequestHeader(SecurityConstants.FROM_SOURCE) String source);

    @PostMapping("/statisticsReportWorld/getCount")
    public YssResponse<Map<String, Long>> getCount(@RequestHeader(SecurityConstants.FROM_SOURCE) String source);

    @PostMapping("/statisticsReportWorld/getCountVersion")
    public YssResponse<Map<String, List<Long>>> getCountVersion(@RequestHeader(SecurityConstants.FROM_SOURCE) String source);

}
